package com.gemme.gemme.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.bumptech.glide.Glide;
import com.gemme.gemme.R;

public class GuanzhuItem1View extends RelativeLayout {
    private Context context;
    public GuanzhuItem1View(Context context) {
        this(context,null);
    }

    public GuanzhuItem1View(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public GuanzhuItem1View(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView();
    }
    ImageView iv_pictrue;
    private void initView() {
        LayoutInflater.from(context).inflate(R.layout.guanzhu_1_item,this);
        iv_pictrue = findViewById(R.id.iv_pictrue);
    }

    public void setData(String imageurl) {
        try {
            Glide.with(context).load(imageurl).into(iv_pictrue);
        }catch (Exception e){

        }
    }
}
